package com.sds.shop.action;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.sds.fw.mvc.Action;
import com.sds.fw.mvc.HttpUtil;
import com.sds.shop.dao.ProductDAO;
import com.sds.shop.vo.ProductVO;

public class ProductModifyAction extends Action {

	@Override
	public void execute(HttpServletRequest request, HttpServletResponse response)
			throws IOException, ServletException {
		ProductDAO dao = new ProductDAO();
		ProductVO vo = new ProductVO();
		String goodsCode = request.getParameter("goodsCode");
		vo = dao.getGoods(goodsCode);
		request.setAttribute("ProductModify", vo);
		String path = "/jsp/productmodify.jsp";
		HttpUtil.forward(request, response, path);
		
	}

}
